package com.jarvis.hospital.prescription.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jarvis.hospital.R;
import com.jarvis.hospital.prescription.model.PerfusionIntervalModel;

import java.util.List;

/**
 * Created by jarvis.liu on 9/12/2016.
 */
public class MTXDurationAdapter extends BaseQuickAdapter<PerfusionIntervalModel> {

    private PerfusionIntervalModel select;

    public MTXDurationAdapter(int layoutResId, List<PerfusionIntervalModel> data, PerfusionIntervalModel select) {
        super(layoutResId, data);
        this.select = select;
    }
    @Override
    protected void convert(BaseViewHolder baseViewHolder, PerfusionIntervalModel perfusionIntervalModel) {
        TextView tv_name = baseViewHolder.getView(R.id.tv_name);
        tv_name.setText(perfusionIntervalModel.getPerfusionIntervalValue());
//        if(select!=null) {
//            if (select.getPerfusionIntervalId().equals(perfusionIntervalModel.getPerfusionIntervalId())) {
//                tv_name.setTextColor(mContext.getResources().getColor(R.color.blue_nomal));
//            } else {
//                tv_name.setTextColor(mContext.getResources().getColor(R.color.black));
//            }
//        }
    }
}
